package com.aaa.vegetablemarketexpress.service;

import com.aaa.vegetablemarketexpress.entity.Product;
import com.aaa.vegetablemarketexpress.util.Page;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * @FileName: ProductService
 * @Description:
 * @Author: qxh
 * @CreateTime: 2025/9/5 19:56
 * @Version: 1.0.0
 */
@Service
public interface ProductService {
//    /**
//     * @Description: 根据id查询商品信息
//     * @Param: [productId]
//     * @return: com.aaa.vegetablemarketexpress.util.Result
//     * @Author: qxh
//     * @CreateTime: 2025/9/5 19:56
//     */
//    Product selectProductById (Long productId);
    /**
     * @Description: 查询商品列表,分页在service层实现
     * @Param: [page]
     * @return: com.aaa.vegetablemarketexpress.util.PageInfo
     * @Author: qxh
     * @CreateTime: 2025/9/5 19:56
     */
    PageInfo selectProductList (Page<Product> page);
    /**
     * @Description: 新增商品
     * @Param: [product]
     * @return: com.aaa.vegetablemarketexpress.entity.Product
     * @Author: qxh
     * @CreateTime: 2025/9/5 19:56
     */
    int insertProduct (Product product);
    /**
     * @Description: 修改商品
     * @Param: [product]
     * @return: com.aaa.vegetablemarketexpress.entity.Product
     * @Author: qxh
     * @CreateTime: 2025/9/5 19:56
     */
    int updateProduct (Product product);
    /**
     * @Description: 删除商品
     * @Param: [productId]
     * @return: int
     * @Author: qxh
     * @CreateTime: 2025/9/5 19:56
     */
    int deleteProductById (Long productId);
    /**
     * 上传商品图片
     * @param file 图片文件
     * @return 图片访问URL
     */
/*    String uploadProductImage(MultipartFile file);*/
    /**
     * 根据商品ID查询商品详情
     * @param productId 商品ID
     * @return
     */
    Product selectProductById(Long productId);



}
